using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VWAFARBEN
    {
        public void SetUpNewRow(ref DataRow dwReturn)
        {

            switch (app.company)
            {
                case "YGR":
                case "AFS":
                case "TST":
                case "UBT":
                case "SXN":
                default:
                    #region=========
                    dwReturn["WAFMANDANT"] = app.Mandant;
                    dwReturn["WAFKUNDNR"] = "00000000";
                    dwReturn["WAFWERK"] = "   ";
                    dwReturn["WAFABT"] = "   ";
                    dwReturn["WAFART"] = "S3-2032             ";
                    dwReturn["WAFVAR"] = "  ";
                    dwReturn["WAFZUART"] = "C";
                    dwReturn["WAFZUSATZ"] = "2         ";
                    dwReturn["WAFCOLORIT"] = "          ";
                    dwReturn["WAFSTATUS"] = "A";
                    dwReturn["WAFSFKZ"] = "N";
                    dwReturn["WAFBEZ"] = "2                   ";
                    dwReturn["WAFTEXTSCHL"] = "          ";
                    dwReturn["WAFFKARTNR"] = "          ";
                    dwReturn["WAFROHFARBE"] = "          ";
                    dwReturn["WAFMUDESS"] = "330";
                    dwReturn["WAFUNIFARB"] = "260";
                    dwReturn["WAFVGRQM"] = "0";
                    dwReturn["WAFVOLU"] = "0";
                    dwReturn["WAFZTWAHL"] = "0";
                    dwReturn["WAFRAPPH"] = "0";
                    dwReturn["WAFRAPPB"] = "0";
                    dwReturn["WAFRUESTGRP"] = "   ";
                    dwReturn["WAFPRUEFGRP"] = " ";
                    dwReturn["WAFSCHABANZ"] = "0";
                    dwReturn["WAFUSCHABANZ"] = "0";
                    dwReturn["WAFFDVF"] = "   ";
                    dwReturn["WAFPRGRP"] = " ";
                    dwReturn["WAFGRPBEZ"] = "330";
                    dwReturn["WAFPREIS"] = "0";
                    dwReturn["WAFZUABPR"] = "0";
                    dwReturn["WAFZUABAB"] = "0";
                    dwReturn["WAFNFART"] = "    ";
                    dwReturn["WAFWERT"] = "0";
                    dwReturn["WAFKZPA"] = " ";
                    dwReturn["WAFZUABVH"] = "0";
                    dwReturn["WAFZUABAK"] = "0";
                    dwReturn["WAFZUABKU"] = "0";
                    dwReturn["WAFZUABPROZ"] = " ";
                    dwReturn["WAFEZUSTAND1"] = "    ";
                    dwReturn["WAFEZUSTAND2"] = "    ";
                    dwReturn["WAFEZUSTAND3"] = "    ";
                    dwReturn["WAFEZUSTAND4"] = "    ";
                    dwReturn["WAFEZUSTAND5"] = "    ";
                    dwReturn["WAFEZUSTAND6"] = "    ";
                    dwReturn["WAFEZUSTAND7"] = "    ";
                    dwReturn["WAFEZUSTAND8"] = "    ";
                    dwReturn["WAFEZUSTAND9"] = "    ";
                    dwReturn["WAFEZUSTAND10"] = "    ";
                    dwReturn["WAFFA"] = "100";
                    dwReturn["WAFGA"] = "100";
                    dwReturn["WAFQA"] = "100";
                    dwReturn["WAFQPKTH"] = "0";
                    dwReturn["WAFQPKTLH"] = "0";
                    dwReturn["WAFLOAN"] = "  ";
                    dwReturn["WAFLBAN"] = "  ";
                    dwReturn["WAFLPAN"] = "        ";
                    dwReturn["WAFABKZAN"] = " ";
                    dwReturn["WAFPKL"] = "  ";
                    dwReturn["WAFVBBRT"] = "0";
                    dwReturn["WAFBRTTOLPL"] = "0";
                    dwReturn["WAFBRTTOLMI"] = "0";
                    dwReturn["WAFVBGRQM"] = "0";
                    dwReturn["WAFVBGRLFD"] = "0";
                    dwReturn["WAFGWTOLPL"] = "0";
                    dwReturn["WAFGWTOLMIN"] = "0";
                    dwReturn["WAFVBFDDIK"] = "0";
                    dwReturn["WAFFDKTOLPL"] = "0";
                    dwReturn["WAFFDKTOLMI"] = "0";
                    dwReturn["WAFVBFDDIS"] = "0";
                    dwReturn["WAFFDSTOLPL"] = "0";
                    dwReturn["WAFFDSTOLMI"] = "0";
                    dwReturn["WAFLAEAEND"] = "0";
                    dwReturn["WAFGWVERL"] = "0";
                    dwReturn["WAFRESTSCHL"] = " ";
                    dwReturn["WAFPHWERTMI"] = "0";
                    dwReturn["WAFPHWERTMA"] = "0";
                    dwReturn["WAFWEISSGRD"] = "0";
                    dwReturn["WAFNETZFVON"] = "0";
                    dwReturn["WAFNETZFBIS"] = "0";
                    dwReturn["WAFNETZFSEK"] = "0";
                    dwReturn["WAFRSSFTRKV"] = "0";
                    dwReturn["WAFRSSFTRKB"] = "0";
                    dwReturn["WAFRSSFTRSV"] = "0";
                    dwReturn["WAFRSSFTRSB"] = "0";
                    dwReturn["WAFUNIFAEH"] = " ";
                    dwReturn["WAFFADGERAD"] = " ";
                    dwReturn["WAFMUSTFRB"] = "          ";
                    dwReturn["WAFVORB"] = "   ";
                    dwReturn["WAFNACHB"] = "   ";
                    dwReturn["WAFMU"] = " ";
                    dwReturn["WAFMURLOD"] = "  ";
                    dwReturn["WAFMUPROD"] = "00";
                    dwReturn["WAFMUCTOD"] = " ";
                    dwReturn["WAFMUDTRL"] = "0";
                    dwReturn["WAFMUBIRL"] = "        ";
                    dwReturn["WAFHUNGLFM"] = " ";
                    dwReturn["WAFHUNGQM"] = " ";
                    dwReturn["WAFHUNBRT"] = " ";
                    dwReturn["WAFHUNFDK"] = " ";
                    dwReturn["WAFHUNFDS"] = " ";
                    dwReturn["WAFLMANRKRS"] = "  ";
                    dwReturn["WAFLMALFDNR"] = "0000";
                    dwReturn["WAFLMAPOS"] = "00";
                    dwReturn["WAFLODKRS"] = "  ";
                    dwReturn["WAFLODLFD"] = "000000";
                    dwReturn["WAFLODPOS"] = "000";
                    dwReturn["WAFKZDUMCOL"] = " ";
                    dwReturn["WAFPSEUDOCOL"] = "          ";
                    dwReturn["WAFPRFSCHL"] = "         ";
                    dwReturn["WAFFILLER"] = "                                                           ";
                    dwReturn["WAFAENDZL"] = "1";
                    dwReturn["WAFAENDBEN"] = "        ";
                    dwReturn["WAFAENDDAT"] = "0";
                    dwReturn["WAFNEUBEN"] = "        ";
                    dwReturn["WAFNEUDAT"] = "0";
                    #endregion 
                    break;
            }
        }
        public DataRow Convert2WAFARBEN(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryWAFARBEN(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                case "AFS":
                case "TST":
                case "UBT":
                case "SXN":
                default:
                    #region=========
                    dwReturn["WAFMANDANT"] = app.Mandant;
                    dwReturn["WAFKUNDNR"] = "00000000";
                    dwReturn["WAFWERK"] = "   ";
                    dwReturn["WAFABT"] = "   ";
                    dwReturn["WAFART"] = "S3-2032             ";
                    dwReturn["WAFVAR"] = "  ";
                    dwReturn["WAFZUART"] = "C";
                    dwReturn["WAFZUSATZ"] = "2         ";
                    dwReturn["WAFCOLORIT"] = "          ";
                    dwReturn["WAFSTATUS"] = "A";
                    dwReturn["WAFSFKZ"] = "N";
                    dwReturn["WAFBEZ"] = "2                   ";
                    dwReturn["WAFTEXTSCHL"] = "          ";
                    dwReturn["WAFFKARTNR"] = "          ";
                    dwReturn["WAFROHFARBE"] = "          ";
                    dwReturn["WAFMUDESS"] = "330";
                    dwReturn["WAFUNIFARB"] = "260";
                    dwReturn["WAFVGRQM"] = "0";
                    dwReturn["WAFVOLU"] = "0";
                    dwReturn["WAFZTWAHL"] = "0";
                    dwReturn["WAFRAPPH"] = "0";
                    dwReturn["WAFRAPPB"] = "0";
                    dwReturn["WAFRUESTGRP"] = "   ";
                    dwReturn["WAFPRUEFGRP"] = " ";
                    dwReturn["WAFSCHABANZ"] = "0";
                    dwReturn["WAFUSCHABANZ"] = "0";
                    dwReturn["WAFFDVF"] = "   ";
                    dwReturn["WAFPRGRP"] = " ";
                    dwReturn["WAFGRPBEZ"] = "330";
                    dwReturn["WAFPREIS"] = "0";
                    dwReturn["WAFZUABPR"] = "0";
                    dwReturn["WAFZUABAB"] = "0";
                    dwReturn["WAFNFART"] = "    ";
                    dwReturn["WAFWERT"] = "0";
                    dwReturn["WAFKZPA"] = " ";
                    dwReturn["WAFZUABVH"] = "0";
                    dwReturn["WAFZUABAK"] = "0";
                    dwReturn["WAFZUABKU"] = "0";
                    dwReturn["WAFZUABPROZ"] = " ";
                    dwReturn["WAFEZUSTAND1"] = "    ";
                    dwReturn["WAFEZUSTAND2"] = "    ";
                    dwReturn["WAFEZUSTAND3"] = "    ";
                    dwReturn["WAFEZUSTAND4"] = "    ";
                    dwReturn["WAFEZUSTAND5"] = "    ";
                    dwReturn["WAFEZUSTAND6"] = "    ";
                    dwReturn["WAFEZUSTAND7"] = "    ";
                    dwReturn["WAFEZUSTAND8"] = "    ";
                    dwReturn["WAFEZUSTAND9"] = "    ";
                    dwReturn["WAFEZUSTAND10"] = "    ";
                    dwReturn["WAFFA"] = "100";
                    dwReturn["WAFGA"] = "100";
                    dwReturn["WAFQA"] = "100";
                    dwReturn["WAFQPKTH"] = "0";
                    dwReturn["WAFQPKTLH"] = "0";
                    dwReturn["WAFLOAN"] = "  ";
                    dwReturn["WAFLBAN"] = "  ";
                    dwReturn["WAFLPAN"] = "        ";
                    dwReturn["WAFABKZAN"] = " ";
                    dwReturn["WAFPKL"] = "  ";
                    dwReturn["WAFVBBRT"] = "0";
                    dwReturn["WAFBRTTOLPL"] = "0";
                    dwReturn["WAFBRTTOLMI"] = "0";
                    dwReturn["WAFVBGRQM"] = "0";
                    dwReturn["WAFVBGRLFD"] = "0";
                    dwReturn["WAFGWTOLPL"] = "0";
                    dwReturn["WAFGWTOLMIN"] = "0";
                    dwReturn["WAFVBFDDIK"] = "0";
                    dwReturn["WAFFDKTOLPL"] = "0";
                    dwReturn["WAFFDKTOLMI"] = "0";
                    dwReturn["WAFVBFDDIS"] = "0";
                    dwReturn["WAFFDSTOLPL"] = "0";
                    dwReturn["WAFFDSTOLMI"] = "0";
                    dwReturn["WAFLAEAEND"] = "0";
                    dwReturn["WAFGWVERL"] = "0";
                    dwReturn["WAFRESTSCHL"] = " ";
                    dwReturn["WAFPHWERTMI"] = "0";
                    dwReturn["WAFPHWERTMA"] = "0";
                    dwReturn["WAFWEISSGRD"] = "0";
                    dwReturn["WAFNETZFVON"] = "0";
                    dwReturn["WAFNETZFBIS"] = "0";
                    dwReturn["WAFNETZFSEK"] = "0";
                    dwReturn["WAFRSSFTRKV"] = "0";
                    dwReturn["WAFRSSFTRKB"] = "0";
                    dwReturn["WAFRSSFTRSV"] = "0";
                    dwReturn["WAFRSSFTRSB"] = "0";
                    dwReturn["WAFUNIFAEH"] = " ";
                    dwReturn["WAFFADGERAD"] = " ";
                    dwReturn["WAFMUSTFRB"] = "          ";
                    dwReturn["WAFVORB"] = "   ";
                    dwReturn["WAFNACHB"] = "   ";
                    dwReturn["WAFMU"] = " ";
                    dwReturn["WAFMURLOD"] = "  ";
                    dwReturn["WAFMUPROD"] = "00";
                    dwReturn["WAFMUCTOD"] = " ";
                    dwReturn["WAFMUDTRL"] = "0";
                    dwReturn["WAFMUBIRL"] = "        ";
                    dwReturn["WAFHUNGLFM"] = " ";
                    dwReturn["WAFHUNGQM"] = " ";
                    dwReturn["WAFHUNBRT"] = " ";
                    dwReturn["WAFHUNFDK"] = " ";
                    dwReturn["WAFHUNFDS"] = " ";
                    dwReturn["WAFLMANRKRS"] = "  ";
                    dwReturn["WAFLMALFDNR"] = "0000";
                    dwReturn["WAFLMAPOS"] = "00";
                    dwReturn["WAFLODKRS"] = "  ";
                    dwReturn["WAFLODLFD"] = "000000";
                    dwReturn["WAFLODPOS"] = "000";
                    dwReturn["WAFKZDUMCOL"] = " ";
                    dwReturn["WAFPSEUDOCOL"] = "          ";
                    dwReturn["WAFPRFSCHL"] = "         ";
                    dwReturn["WAFFILLER"] = "                                                           ";
                    dwReturn["WAFAENDZL"] = "1";
                    dwReturn["WAFAENDBEN"] = "CAD     ";
                    dwReturn["WAFAENDDAT"] = "20140709";
                    dwReturn["WAFNEUBEN"] = "CAD     ";
                    dwReturn["WAFNEUDAT"] = "20140709";
                    #endregion
                    break;
                case "JLT":

                    break;
            }
            INTEXDBC.MapData(IsConvert, ref dwReturn, dwInput);
            return dwReturn;
        }
        public void SaveWAFARBEN(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            bool flgExist = false;
            setResult = QueryWAFARBEN(dwData, 1);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                }
            }
            if (!flgExist)
            {
                InsertWAFARBEN(dwData, ITXDBVERSION);
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                case "AFS":
                case "TST":
                case "UBT":
                case "SXN":
                default:
                    UpdateWAFARBEN(dwData, ITXDBVERSION, 2);
                    break;
                case "JLT":
                    UpdateWAFARBEN(dwData, ITXDBVERSION, 1);
                    break;
            }

        }
        public void InsertWAFARBEN(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            dwData["WAFNEUBEN"] = app.User;
            dwData["WAFNEUDAT"] = date;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                case "AFS":
                case "TST":
                case "UBT":
                case "SXN":
                default:
                    or1.CommandText = "INSERT INTO WAFARBEN ( WAFMANDANT,WAFKUNDNR,WAFWERK,WAFABT,WAFART,WAFVAR,WAFZUART,WAFZUSATZ,WAFCOLORIT,WAFSTATUS,WAFSFKZ,WAFBEZ,WAFTEXTSCHL,WAFFKARTNR,WAFROHFARBE,WAFMUDESS,WAFUNIFARB,WAFVGRQM,WAFVOLU,WAFZTWAHL,WAFRAPPH,WAFRAPPB,WAFRUESTGRP,WAFPRUEFGRP,WAFSCHABANZ,WAFUSCHABANZ,WAFFDVF,WAFPRGRP,WAFGRPBEZ,WAFPREIS,WAFZUABPR,WAFZUABAB,WAFNFART,WAFWERT,WAFKZPA,WAFZUABVH,WAFZUABAK,WAFZUABKU,WAFZUABPROZ,W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FLODLFD:,:WAFLODPOS:,:WAFKZDUMCOL:,:WAFPSEUDOCOL:,:WAFPRFSCHL:,:WAFFILLER:,:WAFAENDZL:,:WAFAENDBEN:,:WAFAENDDAT:,:WAFNEUBEN:,:WAFNEUDAT:)";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    break;
                case "JLT":
                    or1.CommandText = "INSERT INTO WAFARBEN(WAFMANDANT, WAFKUNDNR, WAFWERK, WAFABT, WAFART, WAFVAR, WAFZUART, WAFZUSATZ, WAFCOLORIT, WAFSTATUS, WAFSFKZ, WAFBEZ, WAFTEXTSCHL, WAFFKARTNR, WAFROHFARBE, WAFMUDESS, WAFUNIFARB, WAFVGRQM, WAFVOLU, WAFZTWAHL, WAFRAPPH, WAFRAPPB, WAFRUESTGRP, WAFPRUEFGRP, WAFSCHABANZ, WAFUSCHABANZ, WAFFDVF, WAFPRGRP, WAFGRPBEZ, WAFPREIS, WAFZUABPR, WAFZUABAB, WAFNFART, WAFWERT, WAFKZPA, WAFZUABVH, WAFZUABAK, WAFZUABKU, WAFZUABPROZ, WAFEZUSTAND1, WAFEZUSTAND2, WAFEZUSTAND3, WAFEZUSTAND4, WAFEZUSTAND5, WAFEZUSTAND6, WAFEZUSTAND7, WAFEZUSTAND8, WAFEZUSTAND9, WAFEZUSTAND10, WAFFA, WAFGA, WAFQA, WAFQPKTH, WAFQPKTLH, WAFLOAN, WAFLBAN, WAFLPAN, WAFABKZAN, WAFPKL, WAFVBBRT, WAFBRTTOLPL, WAFBRTTOLMI, WAFVBGRQM, WAFVBGRLFD, WAFGWTOLPL, WAFGWTOLMIN, WAFVBFDDIK, WAFFDKTOLPL, WAFFDKTOLMI, WAFVBFDDIS, WAFFDSTOLPL, WAFFDSTOLMI, WAFLAEAEND, WAFGWVERL, WAFRESTSCHL, WAFPHWERTMI, WAFPHWERTMA, WAFWEISSGRD, WAFNETZFVON, WAFNETZFBIS, WAFNETZFSEK, WAFRSSFTRKV, WAFRSSFTRKB, WAFRSSFTRSV, WAFRSSFTRSB, WAFUNIFAEH, WAFFADGERAD, WAFMUSTFRB, WAFVORB, WAFNACHB, WAFMU, WAFMURLOD, WAFMUPROD, WAFMUCTOD, WAFMUDTRL, WAFMUBIRL, WAFHUNGLFM, WAFHUNGQM, WAFHUNBRT, WAFHUNFDK, WAFHUNFDS, WAFLMANRKRS, WAFLMALFDNR, WAFLMAPOS, WAFLODKRS, WAFLODLFD, WAFLODPOS, WAFKZDUMCOL, WAFPSEUDOCOL, WAFPRFSCHL, WAFFILLER, WAFAENDZL, WAFAENDBEN, WAFAENDDAT, WAFNEUBEN, WAFNEUDAT)"
                   + " VALUES(:WAFMANDANT:,:WAFKUNDNR:,:WAFWERK:,:WAFABT:,:WAFART:,:WAFVAR:,:WAFZUART:,:WAFZUSATZ:,:WAFCOLORIT:,:WAFSTATUS:,:WAFSFKZ:,:WAFBEZ:,:WAFTEXTSCHL:,:WAFFKARTNR:,:WAFROHFARBE:,:WAFMUDESS:,:WAFUNIFARB:,:WAFVGRQM:,:WAFVOLU:,:WAFZTWAHL:,:WAFRAPPH:,:WAFRAPPB:,:WAFRUESTGRP:,:WAFPRUEFGRP:,:WAFSCHABANZ:,:WAFUSCHABANZ:,:WAFFDVF:,:WAFPRGRP:,:WAFGRPBEZ:,:WAFPREIS:,:WAFZUABPR:,:WAFZUABAB:,:WAFNFART:,:WAFWERT:,:WAFKZPA:,:WAFZUABVH:,:WAFZUABAK:,:WAFZUABKU:,:WAFZUABPROZ:,:WAFEZUSTAND1:,:WAFEZUSTAND2:,:WAFEZUSTAND3:,:WAFEZUSTAND4:,:WAFEZUSTAND5:,:WAFEZUSTAND6:,:WAFEZUSTAND7:,:WAFEZUSTAND8:,:WAFEZUSTAND9:,:WAFEZUSTAND10:,:WAFFA:,:WAFGA:,:WAFQA:,:WAFQPKTH:,:WAFQPKTLH:,:WAFLOAN:,:WAFLBAN:,:WAFLPAN:,:WAFABKZAN:,:WAFPKL:,:WAFVBBRT:,:WAFBRTTOLPL:,:WAFBRTTOLMI:,:WAFVBGRQM:,:WAFVBGRLFD:,:WAFGWTOLPL:,:WAFGWTOLMIN:,:WAFVBFDDIK:,:WAFFDKTOLPL:,:WAFFDKTOLMI:,:WAFVBFDDIS:,:WAFFDSTOLPL:,:WAFFDSTOLMI:,:WAFLAEAEND:,:WAFGWVERL:,:WAFRESTSCHL:,:WAFPHWERTMI:,:WAFPHWERTMA:,:WAFWEISSGRD:,:WAFNETZFVON:,:WAFNETZFBIS:,:WAFNETZFSEK:,:WAFRSSFTRKV:,:WAFRSSFTRKB:,:WAFRSSFTRSV:,:WAFRSSFTRSB:,:WAFUNIFAEH:,:WAFFADGERAD:,:WAFMUSTFRB:,:WAFVORB:,:WAFNACHB:,:WAFMU:,:WAFMURLOD:,:WAFMUPROD:,:WAFMUCTOD:,:WAFMUDTRL:,:WAFMUBIRL:,:WAFHUNGLFM:,:WAFHUNGQM:,:WAFHUNBRT:,:WAFHUNFDK:,:WAFHUNFDS:,:WAFLMANRKRS:,:WAFLMALFDNR:,:WAFLMAPOS:,:WAFLODKRS:,:WAFLODLFD:,:WAFLODPOS:,:WAFKZDUMCOL:,:WAFPSEUDOCOL:,:WAFPRFSCHL:,:WAFFILLER:,:WAFAENDZL:,:WAFAENDBEN:,:WAFAENDDAT:,:WAFNEUBEN:,:WAFNEUDAT:)";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    break;
            }

            Connect2Proxy(or1);
        }
        public override string BATCHINSERT(DataRow dwData)
        {
            dwData["WAFNEUBEN"] = app.User;
            dwData["WAFNEUDAT"] = date;
            string value = "";
            switch (app.company)
            {
                default:
                case "SXN":
                case "YGR":
                case "TST":
                    value = "INTO VAFARBEN  "
                   + "  VALUES (:WAFMANDANT:,:WAFKUNDNR:,:WAFWERK:,:WAFABT:,:WAFART:,:WAFVAR:,:WAFZUART:,:WAFZUSATZ:,:WAFCOLORIT:,:WAFSTATUS:,:WAFSFKZ:,:WAFBEZ:,:WAFTEXTS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QM:,:WAFHUNBRT:,:WAFHUNFDK:,:WAFHUNFDS:,:WAFLMANRKRS:,:WAFLMALFDNR:,:WAFLMAPOS:,:WAFLODKRS:,:WAFLODLFD:,:WAFLODPOS:,:WAFKZDUMCOL:,:WAFPSEUDOCOL:,:WAFPRFSCHL:,:WAFFILLER:,:WAFAENDZL:,:WAFAENDBEN:,:WAFAENDDAT:,:WAFNEUBEN:,:WAFNEUDAT:)";
                    value = INTEXDBC.InjectData(value, dwData);
                    break;
            }
            return value;
        }
        public void DeleteWAFARBEN(string client, string art, string var, string color)
        {

            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE WAFARBEN WHERE   "
                         + "  WAFMANDANT=:WAFMANDANT AND WAFART=:WAFART AND WAFVAR=:WAFVAR AND WAFZUSATZ=:WAFZUSATZ";
            or1.Parameters.Add("WAFMANDANT", OracleType.NVarChar).Value = client;
            or1.Parameters.Add("WAFART", OracleType.NVarChar).Value = art;
            or1.Parameters.Add("WAFVAR", OracleType.NVarChar).Value = var;
            or1.Parameters.Add("WAFZUSATZ", OracleType.NVarChar).Value = color;
            Connect2Proxy(or1);
        }
        public DataSet QueryWAFARBEN(DataRow dwData, int option = 1)
        {

            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM WAFARBEN WHERE  ROWNUM<2 ";
                    SResult = Connect2Proxy(or1);

                    break;
                case 1:
                    SResult = QWAF01(dwData);
                    break;
                case 2:
                    SResult = QWAF02(dwData);
                    break;
                case 3:
                    or1.CommandText = "SELECT WAFART,:WAFVAR,WAFZUSATZ,WAFZUABAK FROM WAFARBEN WHERE  WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART: AND WAFVAR=:WAFVAR: ";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    SResult = Connect2Proxy(or1);

                    break;
                case 4:
                    or1.CommandText = "SELECT DISTINCT WF.* FROM WDECK WD RIGHT JOIN WAFARBEN WF ON"
                        + "  WAFMANDANT=WDMANDANT AND WAFART=WDART AND WAFVAR=WDVAR"
                        + " WHERE WDMANDANT=:WDMANDANT: AND WDSA='K' AND WDTYP='B' AND WDWAKZ='F' AND WDAUFKRS=:WDAUFKRS:  AND WDAUFLFD=:WDAUFLFD:";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    SResult = Connect2Proxy(or1);

                    break;
                case 5:
                    or1.CommandText = "SELECT * FROM WAFARBEN WHERE    WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART:  ";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    break;
                case 6:
                    or1.CommandText = "SELECT DISTINCT  W.* FROM WDECK  WD "
                        + " JOIN WAFARBEN W ON WDART=W.WAFART AND WDVAR=W.WAFVAR AND WDFARBE=WAFZUSATZ AND WAFZUART=:WAFZUART:"
                        + " WHERE WDMANDANT=:WDMANDANT AND WDSA='K' AND WDTYP='B' AND WDWAKZ='F' AND WDAUFKRS=:WDAUFKRS  AND WDAUFLFD=:WDAUFLFD";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    SResult = Connect2Proxy(or1);

                    break;
                case 7:
                    or1.CommandText = "SELECT  DISTINCT W.* FROM WDECK  WD "
                        + " JOIN WAFARBEN W ON WDART=W.WAFART AND WDVAR=W.WAFVAR AND WDBESCHICH=WAFZUSATZ AND WAFZUART=:WAFZUART:"
                        + " WHERE WDMANDANT=:WDMANDANT: AND WDSA='K' AND WDTYP='B' AND WDWAKZ='F' AND WDAUFKRS=:WDAUFKRS:  AND WDAUFLFD=:WDAUFLFD:";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    SResult = Connect2Proxy(or1);

                    break;
                case 8:
                    or1.CommandText = "SELECT WAFZUSATZ AS FSFFARBE,WAFBEZ AS FSFABEZ FROM WAFARBEN  WHERE   "
                    + "  WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART:";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    SResult = Connect2Proxy(or1);

                    break;
                case 10:
                    SResult = QWAF10(dwData);
                    break;
                case 51:
                    SResult = QWAF51(dwData);
                    break;
                case -1:
                    SResult = QWAF_1(dwData);
                    break;
                default:
                    break;
            }

            SResult.Tables[0].TableName = "WAFARBEN";
            return SResult;
        }
        public DataSet QWAF01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM WAFARBEN WHERE   "
                     + "  WAFMANDANT=:WAFMANDANT:  AND WAFZUART=:WAFZUART: AND WAFART LIKE '%" + dwData["WAFART"].ToString() + "%' AND WAFBEZ LIKE '%" + dwData["WAFBEZ"].ToString()
                     + "%' AND WAFZUSATZ LIKE '%" + dwData["WAFZUSATZ"].ToString() + "%' "
                     + dwData["WAFCOLORIT"].ToString()
                    ; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QWAF02(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM WAFARBEN WHERE  WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART: AND WAFVAR=:WAFVAR: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1); 
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QWAF01CF(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM WAFARBEN WHERE   "
                     + "  WAFMANDANT=:WAFMANDANT:  AND ( WAFZUART='C' OR WAFZUART='F') AND WAFART LIKE '%" + dwData["WAFART"].ToString() + "%' AND WAFBEZ LIKE '%" + dwData["WAFBEZ"].ToString()
                     + "%' AND WAFZUSATZ LIKE '%" + dwData["WAFZUSATZ"].ToString() + "%' "
                     + dwData["WAFCOLORIT"].ToString()
                    ;
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QWAF10(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM WAFARBEN WHERE WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART: AND WAFVAR=:WAFVAR: AND WAFZUART=:WAFZUART: AND WAFZUSATZ=:WAFZUSATZ: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QWAF11(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM WAFARBEN WHERE WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART: AND WAFVAR=:WAFVAR: AND WAFZUART=:WAFZUART:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QWAF12(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT RTRIM(WAFZUSATZ) AS KEY,WAFART,WAFVAR,WAFZUART, WAFZUSATZ,WAFBEZ FROM WAFARBEN  WHERE   "
                + "  WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART: AND WAFVAR=:WAFVAR:"
                +dwData["WAFZUART"].ToString()
                + " ORDER BY WAFZUSATZ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QWAF51(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT WAFZUSATZ AS FSFFARBE FROM WAFARBEN WHERE     WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART:  ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QWAF_1(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT RTRIM(WAFZUSATZ) AS KEY,WAFART,WAFVAR,WAFZUART, WAFZUSATZ,WAFBEZ FROM WAFARBEN  WHERE   "
                + "  WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART: AND WAFVAR=:WAFVAR: AND WAFZUART=:WAFZUART:"
                + " ORDER BY WAFZUSATZ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public void DeleteWAFARBEN(DataRow dwData, int option = 1)
        {

            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    DWAF01(dwData);
                    break;
                default:
                    break;
            }

        }
        public void DWAF00(DataRow dwData)
        {

            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE FROM WAFARBEN   WHERE  WAFMANDANT=:WAFMANDANT:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void DWAF01(DataRow dwData)
        {

            or1 = OracleDB.CreateCommand(); 
            or1.CommandText = "DELETE FROM WAFARBEN   "
                + " WHERE  WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART: AND WAFVAR=:WAFVAR: AND WAFZUART=:WAFZUART: AND WAFZUSATZ=:WAFZUSATZ:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            Connect2Proxy(or1);
        } 
        public void UpdateWAFARBEN(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            if (dwData != null)
            {
                dwData["WAFAENDBEN"] = app.User;
                dwData["WAFAENDDAT"] = date;
            }
            if (option == 0)
            {
                switch (app.company)
                {
                    case "YGR":
                    case "AFS":
                    case "TST":
                    case "UBT":
                    case "SXN":
                    default:
                        option = 2;
                        break;
                    case "JLT":
                        option = 1;
                        break;
                }
            }
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region

                    or1.CommandText = "UPDATE WAFARBEN SET "
              + "WAFLMANRKRS=:WAFLMANRKRS:,"
              + "WAFLMALFDNR=:WAFLMALFDNR:,"
              + "WAFLMAPOS=:WAFLMAPOS:,"
              + "WAFLODKRS=:WAFLODKRS:,"
              + "WAFLODLFD=:WAFLODLFD:,"
              + "WAFLODPOS=:WAFLODPOS:,"
              + "WAFKZDUMCOL=:WAFKZDUMCOL:,"
              + "WAFPSEUDOCOL=:WAFPSEUDOCOL:,"
              + "WAFPRFSCHL=:WAFPRFSCHL:,"
              + "WAFFILLER=:WAFFILLER:,"
              + "WAFAENDZL=:WAFAENDZL:,"
              + "WAFAENDBEN=:WAFAENDBEN:,"
              + "WAFAENDDAT=:WAFAENDDAT:,"
              + "WAFMANDANT=:WAFMANDANT::,"
              + "WAFKUNDNR=:WAFKUNDNR:,"
              + "WAFWERK=:WAFWERK:,"
              + "WAFABT=:WAFABT:,"
              + "WAFART=:WAFART::,"
              + "WAFVAR=:WAFVAR::,"
              + "WAFZUART=:WAFZUART:,"
              + "WAFZUSATZ=:WAFZUSATZ::,"
              + "WAFCOLORIT=:WAFCOLORIT:,"
              + "WAFSTATUS=:WAFSTATUS:,"
              + "WAFSFKZ=:WAFSFKZ:,"
              + "WAFBEZ=:WAFBEZ:,"
              + "WAFTEXTSCHL=:WAFTEXTSCHL:,"
              + "WAFFKARTNR=:WAFFKARTNR:,"
              + "WAFROHFARBE=:WAFROHFARBE:,"
              + "WAFMUDESS=:WAFMUDESS:,"
              + "WAFUNIFARB=:WAFUNIFARB:,"
              + "WAFVGRQM=:WAFVGRQM:,"
              + "WAFVOLU=:WAFVOLU:,"
              + "WAFZTWAHL=:WAFZTWAHL:,"
              + "WAFRAPPH=:WAFRAPPH:,"
              + "WAFRAPPB=:WAFRAPPB:,"
              + "WAFRUESTGRP=:WAFRUESTGRP:,"
              + "WAFPRUEFGRP=:WAFPRUEFGRP:,"
              + "WAFSCHABANZ=:WAFSCHABANZ:,"
              + "WAFUSCHABANZ=:WAFUSCHABANZ:,"
              + "WAFFDVF=:WAFFDVF:,"
              + "WAFPRGRP=:WAFPRGRP:,"
              + "WAFGRPBEZ=:WAFGRPBEZ:,"
              + "WAFPREIS=:WAFPREIS:,"
              + "WAFZUABPR=:WAFZUABPR:,"
              + "WAFZUABAB=:WAFZUABAB:,"
              + "WAFNFART=:WAFNFART:,"
              + "WAFWERT=:WAFWERT:,"
              + "WAFKZPA=:WAFKZPA:,"
              + "WAFZUABVH=:WAFZUABVH:,"
              + "WAFZUABAK=:WAFZUABAK:,"
              + "WAFZUABKU=:WAFZUABKU:,"
              + "WAFZUABPROZ=:WAFZUABPROZ:,"
              + "WAFEZUSTAND1=:WAFEZUSTAND1:,"
              + "WAFEZUSTAND2=:WAFEZUSTAND2:,"
              + "WAFEZUSTAND3=:WAFEZUSTAND3:,"
              + "WAFEZUSTAND4=:WAFEZUSTAND4:,"
              + "WAFEZUSTAND5=:WAFEZUSTAND5:,"
              + "WAFEZUSTAND6=:WAFEZUSTAND6:,"
              + "WAFEZUSTAND7=:WAFEZUSTAND7:,"
              + "WAFEZUSTAND8=:WAFEZUSTAND8:,"
              + "WAFEZUSTAND9=:WAFEZUSTAND9:,"
              + "WAFEZUSTAND10=:WAFEZUSTAND10:,"
              + "WAFFA=:WAFFA:,"
              + "WAFGA=:WAFGA:,"
              + "WAFQA=:WAFQA:,"
              + "WAFQPKTH=:WAFQPKTH:,"
              + "WAFQPKTLH=:WAFQPKTLH:,"
              + "WAFLOAN=:WAFLOAN:,"
              + "WAFLBAN=:WAFLBAN:,"
              + "WAFLPAN=:WAFLPAN:,"
              + "WAFABKZAN=:WAFABKZAN:,"
              + "WAFPKL=:WAFPKL:,"
              + "WAFVBBRT=:WAFVBBRT:,"
              + "WAFBRTTOLPL=:WAFBRTTOLPL:,"
              + "WAFBRTTOLMI=:WAFBRTTOLMI:,"
              + "WAFVBGRQM=:WAFVBGRQM:,"
              + "WAFVBGRLFD=:WAFVBGRLFD:,"
              + "WAFGWTOLPL=:WAFGWTOLPL:,"
              + "WAFGWTOLMIN=:WAFGWTOLMIN:,"
              + "WAFVBFDDIK=:WAFVBFDDIK:,"
              + "WAFFDKTOLPL=:WAFFDKTOLPL:,"
              + "WAFFDKTOLMI=:WAFFDKTOLMI:,"
              + "WAFVBFDDIS=:WAFVBFDDIS:,"
              + "WAFFDSTOLPL=:WAFFDSTOLPL:,"
              + "WAFFDSTOLMI=:WAFFDSTOLMI:,"
              + "WAFLAEAEND=:WAFLAEAEND:,"
              + "WAFGWVERL=:WAFGWVERL:,"
              + "WAFRESTSCHL=:WAFRESTSCHL:,"
              + "WAFPHWERTMI=:WAFPHWERTMI:,"
              + "WAFPHWERTMA=:WAFPHWERTMA:,"
              + "WAFWEISSGRD=:WAFWEISSGRD:,"
              + "WAFNETZFVON=:WAFNETZFVON:,"
              + "WAFNETZFBIS=:WAFNETZFBIS:,"
              + "WAFNETZFSEK=:WAFNETZFSEK:,"
              + "WAFRSSFTRKV=:WAFRSSFTRKV:,"
              + "WAFRSSFTRKB=:WAFRSSFTRKB:,"
              + "WAFRSSFTRSV=:WAFRSSFTRSV:,"
              + "WAFRSSFTRSB=:WAFRSSFTRSB:,"
              + "WAFUNIFAEH=:WAFUNIFAEH:,"
              + "WAFFADGERAD=:WAFFADGERAD:,"
              + "WAFMUSTFRB=:WAFMUSTFRB:,"
              + "WAFVORB=:WAFVORB:,"
              + "WAFNACHB=:WAFNACHB:,"
              + "WAFMU=:WAFMU:,"
              + "WAFMURLOD=:WAFMURLOD:,"
              + "WAFMUPROD=:WAFMUPROD:,"
              + "WAFMUCTOD=:WAFMUCTOD:,"
              + "WAFMUDTRL=:WAFMUDTRL:,"
              + "WAFMUBIRL=:WAFMUBIRL:,"
              + "WAFHUNGLFM=:WAFHUNGLFM:,"
              + "WAFHUNGQM=:WAFHUNGQM:,"
              + "WAFHUNBRT=:WAFHUNBRT:,"
              + "WAFHUNFDK=:WAFHUNFDK:,"
              + "WAFHUNFDS=:WAFHUNFDS:"
              + " WHERE    WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART:  AND WAFVAR=:WAFVAR:  AND WAFZUART=:WAFZUART:  AND WAFZUSATZ=:WAFZUSATZ:";

                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    #endregion
                    break;
                case 2:
                    #region
                    or1.CommandText = "UPDATE WAFARBEN SET WAFMANDANT=:WAFMANDANT:,WAFKUNDNR=:WAFKUNDNR:,WAFWERK=:WAFWERK:,WAFABT=:WAFABT:,WAFART=:WAFART:,WAFVAR=:WAFVAR:,WAFZUART=:WAFZUART:,WAFZUSATZ=:WAFZUSATZ:,WAFCOLORIT=:WAFCOLORIT:,WAFSTATUS=:WAFSTATUS:,WAFSFKZ=:WAFSFKZ:,WAFBEZ=:WAFBEZ:,WAFTEXTSCHL=:WAFTEXTSCHL:,WAFFKARTNR=:WAFFKARTNR:,WAFROHFARBE=:WAFROHFARBE:,WAFMUDESS=:WAFMUDESS:,WAFUNIFARB=:WAFUNIFARB:,WAFVGRQM=:WAFVGRQM:,WAFVOLU=:WAFVOLU:,WAFZTWAHL=:WAFZTWAHL:,WAFRAPPH=:WAFRAPPH:,WAFRAPPB=:WAFRAPPB:,WAFRUESTGRP=:WAFRUESTGRP:,WAFPRUEFGRP=:WAFPRUEFGRP:,WAFSCHABANZ=:WAFSCHABANZ:,WAFUSCHABANZ=:WAFUSCHABANZ:,WAFFDVF=:WAFFDVF:,WAFPRGRP=:WAFPRGRP:,WAFGRPBEZ=:WAFGRPBEZ:,WAFPREIS=:WAFPREIS:,WAFZUABPR=:WAFZUABPR:,WAFZUABAB=:WAFZUABAB:,WAFNFART=:WAFNFART:,WAFWERT=:WAFWERT:,WAFKZPA=:WAFKZPA:,WAFZUABVH=:WAFZUABVH:,WAFZUABAK=:WAFZUABAK:,WAFZUABKU=:WAFZUABKU:,WAFZUABPROZ=:WAFZUABPROZ:,WAFEZUSTAND1=:WAFE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AFRSSFTRSB=:WAFRSSFTRSB:,WAFUNIFAEH=:WAFUNIFAEH:,WAFFADGERAD=:WAFFADGERAD:,WAFMUSTFRB=:WAFMUSTFRB:,WAFVORB=:WAFVORB:,WAFNACHB=:WAFNACHB:,WAFMU=:WAFMU:,WAFMURLOD=:WAFMURLOD:,WAFMUPROD=:WAFMUPROD:,WAFMUCTOD=:WAFMUCTOD:,WAFMUDTRL=:WAFMUDTRL:,WAFMUBIRL=:WAFMUBIRL:,WAFHUNGLFM=:WAFHUNGLFM:,WAFHUNGQM=:WAFHUNGQM:,WAFHUNBRT=:WAFHUNBRT:,WAFHUNFDK=:WAFHUNFDK:,WAFHUNFDS=:WAFHUNFDS:,WAFLMANRKRS=:WAFLMANRKRS:,WAFLMALFDNR=:WAFLMALFDNR:,WAFLMAPOS=:WAFLMAPOS:,WAFLODKRS=:WAFLODKRS:,WAFLODLFD=:WAFLODLFD:,WAFLODPOS=:WAFLODPOS:,WAFKZDUMCOL=:WAFKZDUMCOL:,WAFPSEUDOCOL=:WAFPSEUDOCOL:,WAFPRFSCHL=:WAFPRFSCHL:,WAFFILLER=:WAFFILLER:,WAFAENDZL=:WAFAENDZL:,WAFAENDBEN=:WAFAENDBEN:,WAFAENDDAT=:WAFAENDDAT: "
                        + " WHERE   WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART:  AND WAFVAR=:WAFVAR:  AND WAFZUART=:WAFZUART:  AND WAFZUSATZ=:WAFZUSATZ:";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    #endregion
                    break;
            }

            Connect2Proxy(or1);
        }
        public void UZUART(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE WAFARBEN SET WAFZUART=:WAFZUART:"
             + " WHERE   WAFMANDANT=:WAFMANDANT: AND WAFART=:WAFART:  "+dwData["WAFFILLER"].ToString();
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
    }
}
